﻿

using IotContract.Models.Process;
using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Models.Jobs.F29;
/// <summary>
/// 充放电任务
/// </summary>
public class F29FmtJob: ProcessBaseData
{
    /// <summary>
    /// 库位设备编号
    /// </summary>
    [ProtoMember(1)]
    public string EquipNum { get; set; }
    /// <summary>
    /// 库位设备编号2
    /// </summary>
    [ProtoMember(2)]
    public string EquipNum2 { get; set; }
    /// <summary>
    /// 任务ID
    /// </summary>
    [ProtoMember(3)]
    public string JobID { get; set; }
    /// <summary>
    /// 库位1
    /// </summary>
    [ProtoMember(4)]
    public int Stage { get; set; }
    /// <summary>
    /// 库位2
    /// </summary>
    [ProtoMember(5)]
    public int Stage2 { get; set; }

    /// <summary>
    /// 完成时间
    /// </summary>
    [ProtoMember(6)]
    public DateTime? OrderTime { get; set; }

    /// <summary>
    ///  1:预约   2:入库中  3：入库完成  4:开始作业  
    /// </summary>
    [ProtoMember(7)]
    public int Status { get; set; }
    /// <summary>
    /// 创建时间
    /// </summary>
    [ProtoMember(8)]
    public DateTime? CreateTime { get; set; }
    /// <summary>
    /// 任务2
    /// </summary>
    [ProtoMember(9)]
    public string JobID2 { get; set; }

    /// <summary>
    /// 获取Key
    /// </summary>
    /// <returns></returns>
    public string GetKey()
    {
        return $"{JobID}-{JobID2 ?? ""}";
    }
    public override string ToString()
    {
        return $"Fmt JobID {JobID},EquipNumber {EquipNum},Stage {Stage} Status {Status}";
    }
}
